package com.student.recruitment.app.entity;

import java.sql.Blob;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;


@Entity
@Table(name="EMPLOYEE")
public class EmployeeEntity
{
    @Id
    @Column(name="ID")
    @SequenceGenerator(name = "employee_id_seq", sequenceName = "employee_id_seq", allocationSize = 1, initialValue = 0)
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="employee_id_seq")   
    private Integer id;
    
    @Column(name="USERNAME")
    @NotEmpty
    private String username;
    
    @Column(name="PASSWORD")
    @NotEmpty
    private String password;
    
    @Column(name="FIRSTNAME")
    @Size(min=1, max=12)
    private String firstname;
    
    @Column(name="LASTNAME")
    @Size(min=1, max=12)
    private String lastname;
    
    
    @Column(name="EMAIL")
    @NotEmpty @Email
    private String email;
    
    @Column(name="SEX")
    private String sex;
    
    @Column(name="TELEPHONE")
    @NotNull @Min(100000000) @Max(999999999)
    private Integer telephone;
    
    @Column(name="BIRTHDAY")
    @DateTimeFormat(pattern="MM/dd/yyyy")
    @NotNull @Past
    private Date birthday;
    
    @Column(name="PESEL")
    @Size(min=11, max=11)
    private String pesel;
    
    @Column(name="STATUS")
    private String status="ZAREJESTROWANY";
    
    @Column(name="ENABLED")
    private Integer enabled=1;
    
    @Column(name="ROLE")
    private String ROLE="ROLE_USER";
    
    @Column(name="FIRST")
    @NotNull  @Max(100)
    private Integer first;
    
    @Column(name="SECOND")
    @NotNull  @Max(100)
    private Integer second;
    
    @Column(name="THIRD")
    @NotNull  @Max(100)
    private Integer third;
    
    @Column(name="SUM")
    private Integer sum;
    
    @Column(name="DIRECTION")
    private String direction;
    
    @Column(name="SCHOOL")
    private String school;
    
    @Column(name="BIRTHPLACE")
    private String birthplace;
    
    
    
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public Integer getFirst() {
		return first;
	}
	public void setFirst(Integer first) {
		this.first = first;
	}
	public Integer getSecond() {
		return second;
	}
	public void setSecond(Integer second) {
		this.second = second;
	}
	public Integer getThird() {
		return third;
	}
	public void setThird(Integer third) {
		this.third = third;
	}
	public Integer getSum() {
		return sum;
	}
	public void setSum(Integer sum) {
		this.sum = sum;
	}
	public String getDirection() {
		return direction;
	}
	public void setDirection(String direction) {
		this.direction = direction;
	}
	public String getSchool() {
		return school;
	}
	public void setSchool(String school) {
		this.school = school;
	}
	public String getBirthplace() {
		return birthplace;
	}
	public void setBirthplace(String birthplace) {
		this.birthplace = birthplace;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getROLE() {
		return ROLE;
	}
	public void setROLE(String ROLE) {
		ROLE = ROLE;
	}
	public String getPesel() {
		return pesel;
	}
	public void setPesel(String pesel) {
		this.pesel = pesel;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getFirstname() {
		return firstname;
	}
	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}
	public String getLastname() {
		return lastname;
	}
	public void setLastname(String lastname) {
		this.lastname = lastname;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public Integer getTelephone() {
		return telephone;
	}
	public void setTelephone(Integer telephone) {
		this.telephone = telephone;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Integer getEnabled() {
		return enabled;
	}
	public void setEnabled(Integer enabled) {
		this.enabled = enabled;
	}


}